package com.hightrast.service.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.hightrast.service.api.baseEntity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author hx
 * @since 2025-01-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="RastProducts对象", description="商品表")
public class RastProducts extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品名称")
    private String title;

    @ApiModelProperty(value = "商品描述")
    private String bodyHtml;

    @ApiModelProperty(value = "供应商或品牌名称")
    private String vendor;

    @ApiModelProperty(value = "商品类型")
    private String productType;

    @ApiModelProperty(value = "商品创建的时间")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "商品最后一次更新的时间")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "商品发布的时间")
    private LocalDateTime publishedAt;

    @ApiModelProperty(value = "商品的发布范围，值为1- global，2-web")
    private String publishedScope;

    @ApiModelProperty(value = "商品标签")
    private String tags;

    @ApiModelProperty(value = "商品状态，1- active，2- inactive")
    private String status;

    @ApiModelProperty(value = "价格")
    private BigDecimal price;

    @ApiModelProperty(value = "商品佣金率")
    private BigDecimal commissonRate;

    @ApiModelProperty(value = "商品佣金率调整时间")
    private LocalDateTime commissonRateDate;

    @ApiModelProperty(value = "商品成本")
    private BigDecimal sampleCost;

    @ApiModelProperty(value = "商品变体")
    @TableField(exist = false)
    private List<RastProductVariants> variants;

    @ApiModelProperty(value = "商品图片")
    @TableField(exist = false)
    private List<RastProductImages> images;

}
